<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">

<head>
<title>制度修改</title>
<meta name="keywords" content="社团管理系统，常州大学，课程设计" />

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="本系统基于TP3.2开发，感谢开源">
<link rel="shortcut icon" href="favicon.ico">
<link href="/orientation/Public/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
<link href="/orientation/Public/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
<link href="/orientation/Public/css/animate.min.css" rel="stylesheet">
<link href="/orientation/Public/css/style.min862f.css?v=4.1.0" rel="stylesheet">
<link href="/orientation/Public/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/orientation/Public/css/iconfont.css" rel="stylesheet"/>

    <!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div method="get" class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">身份证</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="idcard">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">学号</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentid">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentname">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否预报</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="forecast" value="<?php echo ($res['forecast']); ?>">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="studentsex" value="<?php echo ($res['studentsex']); ?>">
                            		<option value="男" >男</option>
                            		<option value="女" >女</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电话号码</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentnumber">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宿舍等级</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="dormitorygrade">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宿舍号</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="dormitory" value="<?php echo ($res['dormitory']); ?>">                           	
                            		<?php if(is_array($dormitory)): $i = 0; $__LIST__ = $dormitory;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><option value="<?php echo ($val["dormitory"]); ?>"><?php echo ($val["dormitory"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            	</select>
<!--                                <input type="text" class="form-control" value="<?php echo ($res['dormitory']); ?>" id="dormitory">-->
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否报到</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="report" value="<?php echo ($res['report']); ?>">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">家庭住址</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="address">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否有病史</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="sick" value="<?php echo ($res['sick']); ?>">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">贫困证明</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="prove">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否购买保险费</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="insurance" value="<?php echo ($res['insurance']); ?>">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">班级名称</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="classname" value="<?php echo ($res['classname']); ?>">                           	
                            		<?php if(is_array($class)): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><option value="<?php echo ($val["classname"]); ?>" ><?php echo ($val["classname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            	</select>
                               <!-- <input type="text" class="form-control" value="<?php echo ($res['classname']); ?>" id="classname">-->
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">专业名称</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="spename" value="<?php echo ($res['spename']); ?>">             	
                            		<?php if(is_array($spe)): $i = 0; $__LIST__ = $spe;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><option value="<?php echo ($val["spename"]); ?>"><?php echo ($val["spename"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            	</select>

                            </div>
                        </div>
                        <button id="subbtn" class="btn btn-w-m btn-info" type="button" data-id="<?php echo ($res['idcard']); ?>">确认提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<script src="/orientation/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/orientation/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/orientation/Public/js/content.min.js?v=1.0.0"></script>
<script src="/orientation/Public/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
<script>
    $('#subbtn').on('click',function () {
        var btn = $(this);
        var idcard = $('#idcard').val();
        var studentid = $('#studentid').val();
        var studentname = $('#studentname').val();
        var forecast = $('#forecast').val();
        var studentsex = $('#studentsex').val();
        var studentnumber = $('#studentnumber').val();
        var dormitorygrade = $('#dormitorygrade').val();
        var dormitory = $('#dormitory').val();
        var report = $('#report').val();
        var address = $('#address').val();
        var sick = $('#sick').val();
        var prove = $('#prove').val();
        var insurance = $('#insurance').val();
        var classname = $('#classname').val();
        var spename = $('#spename').val();
        var param = {
        	idcard:idcard,
            studentid:studentid,
            studentname:studentname,
            studentsex:studentsex,
            forecast:forecast,
            report:report,
            studentnumber:studentnumber,
            dormitorygrade:dormitorygrade,
            dormitory:dormitory,
            address:address,
            sick:sick,
            prove:prove,
            insurance:insurance,
            classname:classname,
            spename:spename
        };
        console.log(param);
        var url = "<?php echo U('Departadmin/addstudent');?>";
        $.ajax({
            url: url,
            data: param,
            dataType: 'json',
            type: 'post',
            success: function (data) {
                alert(data.info);
                if (data.status == 1) {
                }
            },
            error: function () {
                alert('操作失败');
            }
        })
    })
</script>
</html>